package cn.example.freid.util;

public class StringUtil {

	private static StringUtil stringUtil;
	
	private StringUtil() {
	}

	static public boolean isNullOrEmpty(String string) {
		if (stringUtil == null) 
			stringUtil = new StringUtil();
		return stringUtil._isNullOrEmpty(string);
	}
	
	static public boolean isNullOrEmpty(String... strings) {
		if (stringUtil == null) 
			stringUtil = new StringUtil();
		for (int i = 0; i < strings.length; i++) 
			if (stringUtil._isNullOrEmpty(strings[i]))
				return true;
		return false;
	}
	
	private boolean _isNullOrEmpty(String string) {
		if (string == null || string.equals(""))
			return true;
		else 
			return false;
	}
}
